﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class toptop : System.Web.UI.UserControl
{
	public string nowdate,nowweek,datedate;
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            datedate = DateTime.Now.Year+"年"+DateTime.Now.Month+"月"+DateTime.Now.Day+"日";
			nowdate=getWelcomeMsg();
				
        }
    }
	
	public   string   getWelcomeMsg()   
  {   
    
  string   strToday   =   DateTime.Today.ToShortDateString();   
  string   strWeekname   =   DateTime.Today.DayOfWeek.ToString().ToLower();   
  switch(strWeekname)   
  {   
  case   "monday":   
  strWeekname   =   "星期一";   
  break;   
  case   "tuesday":   
  strWeekname   =   "星期二";   
  break;   
  case   "wednesday":   
  strWeekname   =   "星期三";   
  break;   
  case   "thursday":   
  strWeekname   =   "星期四";   
  break;   
  case   "friday":   
  strWeekname   =   "星期五";   
  break;   
  case   "saturday":   
  strWeekname   =   "星期六";   
  break;   
  case   "sunday":   
  strWeekname   =   "星期日";   
  break;   
  }   
  string   retVal   =   "<font   color=\"#333333\">今天是"   +   datedate   +   "&nbsp;"   +   strWeekname   +   "</font>";   
  return   retVal;   
  }

}
